import * as API from "@/utils/request";

export default {
    page: params =>{
        return API.GET('/position',params);
    },
    add: params =>{
        return API.POST('/position',params);
    },
    update: params => {
        return API.PUT('/position',params);
    },
    remove: params => {
        return API.DELETE('/position',params);
    },
    getTemplateFile: params => {
        return API.GET(`/position/getTemplateFile`);
    },
    getExportFile: params => {
        return API.POST(`/position/getExportFile`, params);
    },
    importData: params => {
        return API.POST(`/position/importData`);
    },
    downloadFile: (fileName) => {
        return API.downloadByPost(`/position/downloadFile/${fileName}/`);
    },
    getDict: () => {
        return API.GET('/position/getPositionDict');
    }
}
